Page({
  data: {
    building: '',
    gender: 0,
    id: '',
    idcardBackUrl: '',
    idcardFrontUrl: '',
    mobile: '',
    name: '',
    point: '',
    room: '',
    status: 1
  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.id,
    })
  },
  onLoad({ id }) {
    console.log(id);
    this.getUserdetail(id)
  },
  async getUserdetail(id) {
    const res = await wx.http({
      url: `/room/${id}`
    })
    console.log(res);
    this.setData({ ...res.data })
  }
})
